<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
 <script>
      // 1. 数据类型
      // 基本类型 数字，字符串，布尔，undefined，null
      let num = 1
      console.log('num', num)
      let food = '西兰花炒蛋'
      console.log('food', food)
      let male = false
      console.log('male', male)
      let empty = undefined
      console.log('empty', empty)
      let empty2 = null
      console.log('empty2', empty2)

       // 复杂类型 对象，数组，函数
       //对象
        let  person ={
            name :'zs',
            age :17,
            male :true 
        }
        console.log(person)

//数组
let foods = ['西兰花', '西葫芦', '西红柿', '西瓜', '西北风']
console.log(foods)
//函数
let sayhi=function(){
    console.log('么么哒')
}
sayhi()

//常量无法修改
const pi=123
//pi=234 常量无法修改
console.log(pi)


const dog = {
        name: '柯基',
        color: '橘黄色',
        food: ['骨头', '狗粮'],
      }
      //常量无法直接修改,但是里面的属性,可以修改
dog .color='绿色'

console.log(dog)




 </script>


</body>
</html>